package com.symbian.controller;


import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.symbian.config.ResponseHelper;
import com.symbian.config.ResponseModel;
import com.symbian.entity.Menu;
import com.symbian.entity.Role;
import com.symbian.service.IMenuService;
import com.symbian.service.IRoleToMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author liyang123
 * @since 2018-05-03
 */
@RestController
@RequestMapping("/system/menus")
//不加入swagger ui里
@ApiIgnore
public class MenuController {
    @Autowired
    IMenuService menuService;

    /**
     *  获取所有角色
     */
    @GetMapping("/build")
    public ResponseModel<List<Menu>> getAllRole(){
        return ResponseHelper.buildResponseModel(menuService.selectList(new EntityWrapper<Menu>()));
    }
}

